package download.itydl.com.sinlethread.bean;

/**
 * 线程信息
 * 下载线程 应该知道当前线程标识 id ；下载需要知道url；断点续传需要知道线程开启下载起始位置start、end；续传的话要知道下载了多少finished
 * @author howard
 */
public class ThreadInfo {
    /**
     * 当前线程标识 id
     */
    private int id;

    /**
     * 下载的url 跟文件对应的 url一致
     */
    private String url;

    /**
     * 开始位置
     */
    private long start;

    /**
     * 结束位置
     */
    private long end;

    /**
     * 下载了多少，进度值
     */
    private long finished;

    public ThreadInfo() {

    }

    public ThreadInfo(int id, String url, long start, long end, long finished) {
        this.id = id;
        this.url = url;
        this.start = start;
        this.end = end;
        this.finished = finished;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }

    public long getFinished() {
        return finished;
    }

    public void setFinished(long finished) {
        this.finished = finished;
    }
}
